package test.lemonyfei.http.utils;

import javax.swing.*;
import java.util.HashMap;

/**
 * Created by sh00556 on 2017/4/25.
 */
public class HttpContext {
    private String actualRequest;
    private String expectResponse;
    private String requestParams;
    private String url;
    private int resultCode;
    private HashMap<String, String> headers;
    private String responseBody;
    private JTextArea areaOfConsole;

    public String getUrl() {
        return this.url;
    }

    public void setUrl(String url) {
        if (url.substring(0, 1).equals("/")) {
            this.url = url;
        } else {
            this.url = ("/" + url);
        }
    }

    public JTextArea getAreaOfConsole() {
        return this.areaOfConsole;
    }

    public void setAreaOfConsole(JTextArea areaOfConsole) {
        this.areaOfConsole = areaOfConsole;
    }

    public String getActualRequest() {
        return this.actualRequest;
    }

    public void setActualRequest(String actualRequest) {
        this.actualRequest = actualRequest;
    }

    public String getExpectResponse() {
        return this.expectResponse;
    }

    public void setExpectResponse(String expectResponse) {
        this.expectResponse = expectResponse;
    }

    public String getRequestParams() {
        return this.requestParams;
    }

    public void setRequestParams(String requestParams) {
        this.requestParams = requestParams;
    }

    public String getResponseBody() {
        return this.responseBody;
    }

    public void setResponseBody(String responseBody) {
        this.responseBody = responseBody;
    }

    public int getResultCode() {
        return this.resultCode;
    }

    public void setResultCode(int resultCode) {
        this.resultCode = resultCode;
    }

    public HashMap<String, String> getHeaders() {
        return this.headers;
    }

    public void setHeaders(HashMap<String, String> headers) {
        this.headers = headers;
    }
}
